<?php
    require_once "../funciones.php";
    autenticado();
    $caweb = con_intranetpccom();
    $reqId = $_REQUEST['id'];  //item del equipo
    $sql = "select sol.*,estRqNombre from solucionesRq sol ";
    $sql .= "inner join estadosRq est on est.estRqId = sol.estRqId ";
    $sql .= "where sol.reqId = $reqId ";
    $reault = mysql_query($sql) or die("Error SQL: ".  mysql_error());
    if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") )
        header("Content-type: application/xhtml+xml;charset=utf-8");
    else
        header("Content-type: text/xml;charset=utf-8");
    echo "<?xml version='1.0' encoding='utf-8'?>";
    echo "<rows>";
    $numero=1;
    while($row = mysql_fetch_array($reault,MYSQL_ASSOC)) {
	echo "<row id='".$numero."'>";
	echo "<cell>". $numero."</cell>";
	echo "<cell>". $row['solRqFec']."</cell>";
	echo "<cell>". $row['solRqUsr']."</cell>";
	echo "<cell>". $row['estRqNombre']."</cell>";
        $sql ="select tipRqNombre from tiposRq where tipRqId = ".$row['tipRqId'];
        $result = mysql_query($sql) or die("Error SQL: ".  mysql_error());
        $tipo = mysql_fetch_array($result);
        echo "<cell>". $tipo['tipRqNombre']."</cell>";
        echo "<cell>". utf8_encode($row['solRqDes'])."</cell>";
	echo "</row>";
        $numero=$numero+1;
    }
    echo "</rows>";
?>